﻿using RecruitmentAgency.Models.DataProviders;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace RecruitmentAgency.Tests.Models.DataProviders
{
    /// <summary>
    ///This is a test class for AccountDataProviderTest and is intended
    ///to contain all AccountDataProviderTest Unit Tests
    ///</summary>
    [TestClass]
    public class AccountDataProviderTest
    {
        private TestContext testContextInstance;

        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

        /// <summary>
        ///A test for ValidateUser
        ///</summary>
        [TestMethod]        
        public void ValidateUserTest()
        {
            AccountDataProvider target = new AccountDataProvider();             
            string userName = "giga";
            string password = "giuseppe";
            bool expected = false;
            bool actual = target.ValidateUser(userName, password);
            Assert.AreEqual(expected, actual);            
        }

        /// <summary>
        ///A test for GetSaltByUsername
        ///</summary>       
        [TestMethod()]        
        public void GetSaltByUsernameTest()
        {
            AccountDataProvider target = new AccountDataProvider(); 
            string username = "giga"; 
            byte[] expected = new byte[5];
            byte[] actual = target.GetSaltByUsername(username);
            Assert.AreNotSame(expected, actual);            
        }           
    }
}